
# 元组: tuple 不可修改

t1 = (1, "Hello", False)
print(type(t1))

# 只有一个元素 需要加 ,
single_t = (1,)
print(type(single_t))


t2: tuple = (0, 1, 2, 3, 4, 5, 6)
# 进行切片, 从头开始, step1
res = t2[:]
print(f"结果:{res}")

# 从后往前
res = t2[::-2]
print(f"从后往前切片: {res}")

print(f"倒序输出: {sorted(t2, reverse=True)}")

